package com.wms.controller;

import com.wms.common.CallBack;
import com.wms.common.Response;
import com.wms.domain.StorehouseDomain;
import com.wms.service.Storehouse.StorehouseService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "库存管理")
@RequestMapping(path = "/Storehouse/")
@RestController
public class Storehouse {
    @Autowired
    private StorehouseService storehouseService;


    @ApiOperation(value="查询通知单")
    @RequestMapping(path="getStorehousePage",method= RequestMethod.POST)
    public Response getStorehousePage(@RequestBody StorehouseDomain storehouseDomain){
        return new CallBack() {
            @Override
            protected Object run() {
                return storehouseService.getStorehousePage(storehouseDomain);
            }
        }.execute();
    }

//    @ApiOperation(value="根据商品查找库存代货位")
//    @RequestMapping(path="getStorehouseByGid",method= RequestMethod.GET)
//    @ApiImplicitParam(name = "id", value = "id", required = true)
//    public Response getStorehouseByGid(final Long id){
//        return new CallBack() {
//            @Override
//            protected Object run() {
//                return storehouseService.getStorehouseByGid(id);
//            }
//        }.execute();
//    }


}
